/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-19 14:42:56
 * @LastEditors: Wang Shuo wangshuo@sgsimulation.com
 * @LastEditTime: 2024-08-30 13:39:01
 * @FilePath: \SGFEM\DataStructure\FEM\Material\include\Anisotropic2DMaterial.h
 * @Description: 二维维线弹性各项异性材料
 * MAT2
 */
#pragma once
#include "Utility/Algebra/Matrix.h"

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Input/Material/MaterialBase.h"

#include "MaterialTypes.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct Anisotropic2DMaterial : public MaterialBase
{
    /// @brief 构造函数，创建各项异性材料
    /// @param id 材料属性号，默认0
    // Anisotropic2DMaterial (SG::DataStructure::Common::Id id = 0);
    SG::DataStructure::Common::Real m_G[6]     = { 0.0 };  ///< 弹性常数，G11 G12 G13 G22 G23 G33
    SG::DataStructure::Common::Real m_rho      = 0.0;      ///< 密度
    SG::DataStructure::Common::Real m_Ai[3]    = { 0.0 };  ///< 热膨胀系数
    SG::DataStructure::Common::Real m_tref     = 0.0;      ///< 参考温度
    SG::DataStructure::Common::Real m_ge       = 0.0;      ///< 单元阻尼系数
    SG::DataStructure::Common::Real m_ST       = 0.0;      ///< 拉伸强度极限
    SG::DataStructure::Common::Real m_SC       = 0.0;      ///< 压缩强度极限
    SG::DataStructure::Common::Real m_SS       = 0.0;      ///< 剪切强度极限
    SG::DataStructure::Common::Id   m_mcsid    = 0;        ///< 材料坐标系标识
    SG::DataStructure::Common::Id   m_domainId = 0;
    // std::vector<SG::DataStructure::Common::Real> m_GEMatrix;            ///< 阻尼矩阵

    static MaterialTypes GetType ()
    {
        return MaterialTypes::MATTYPE_2DAnisotropic;
    };
};

DECLSPEC bool operator== (const Anisotropic2DMaterial& val1, const Anisotropic2DMaterial& val2);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE